import os  
import os.path  
def my_cmp(E1, E2):  
    return -cmp(E1[1], E2[1])   
L={}  
k={}  
count=0  
rootdir = "/Users/kaixin/Desktop/config/config"  
def sortedDictValues1(adict): 
	items = adict.items() 
	items.sort() 
	return [value for key, value in items] 
for parent, dirnames, filenames in os.walk(rootdir):  
#case 1:  
# for dirname in dirnames:  
#  print "parent is:" + parent  
#  print "dirname is:" + dirname  
#case 2  

 for filename in filenames:  
#  print "filename with full path " + os.path.join(parent, filename) + "       size %d"% os.path.getsize(os.path.join(parent, filename))   
#   L[os.path.join(parent, filename)]=os.path.getsize(os.path.join(parent, filename))  
   name=os.path.join(parent, filename)    
   L[os.path.getsize(name) ]=  name         
#   L=dict([name,os.path.getsize(name)])  
   count=count+1  


items = L.items()
items.sort()
for key,value in items:
   name = value.split("/")[len(value.split("/")) -1]
   #print key, name[0:len(name) -4]
   #print "'" + name[0:len(name) -4]+"',"
   name2 = name[0:len(name) -4]
   print "'" + name2[0:1].lower()+ name2[1:] + "',"

